#ifndef FSCAN_H_
#define FSCAN_H_

#include "config.h"
#include "protocolo_NIPC.h"
#include "manejarDisco.h"
#include "sock.h"
#include <ctype.h>
#include <string.h>

struct parPS_f{
		int SectorLogico;
		int flag;
		int codigo;
		int socket;
		char buffer[512];
		struct parPS_f *ptrSgte;
		};
typedef struct parPS_f parPS_f;
typedef parPS_f *ptrParPS_f;

parPS_f cabezal_f;


ptrParPS_f *ptrLstPrim_f;
ptrParPS_f *ptrLstSec_f;
ptrParPS_f *ptrLstAcum_f;


void info_fscan(void);
void clean_fscan(char *c);
void trace_fscan(ptrColaParam*,ptrColaParam*,parametros);
void calcularTiempos_fscan();
void selecCola_fscan(ptrColaParam*,ptrColaParam*,colaParam, char);
void agregarElemento_fscan(ptrColaParam*,colaParam,char);
int imprimirResultados_fscan(colaParam);
void imprimir_fscan(ptrParPS_f ptrActual); /*funcion temporal*/
int quitar_f(ptrColaParam*,colaParam);
char sentidoOpuesto_fscan(char sentido);
void alExtremo(char sentido, int fd, int sem);
colaParam buscar_fscan(ptrColaParam,char);
int imprimir_f(ptrParPS_f); /*temporal*/
int parsearTrace_f (char*,int*);
int descargarAcumulada(ptrColaParam*);
int loguearLista_f();
#endif /* FSCAN_H_ */
